package com.qiall.common.entity;

import lombok.Data;

import java.io.Serializable;

@Data
public class PageQuery  implements Serializable {
    private static final long serialVersionUID = 3741077973118075614L;

    String  startTime;
    String endTime;
    private int pageSize;
    private int pageNum;

    public int offset(){
        return (pageNum-1)*pageSize;
    }
    public int limit(){
        return  pageSize;
    }

    public static PageQuery getDefault(){
        PageQuery pageQuery=new PageQuery();
        pageQuery.setPageNum(1);
        pageQuery.setPageSize(10);
        return pageQuery;
    }
}
